package com.ruoyi.yljf.domain.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.yljf.domain.GoodsOrder;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 商品订单表对象 yljf_goods_order
 * 
 * @author TATAT
 * @date 2025-03-26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GoodsOrderVO {

    /** 主键id */
    private Long id;

    /** 订单状态（0-待付款，1-已付款，2-运输中  3-已接收） */
    private Long status;

    /** 商品id */
    private Long dishId;

    /** 商品名 */
    private String name;

    /** 商品图片 */
    private String image;

    /** 商品价格 */
    private Long amount;

    /** 收货详细地址 */
    private String address;

    /** 收件人手机号 */
    private String userPhone;

    /** 收货人姓名 */
    private String userName;

    /** 支付方式(qifu-祈福币   points-积分  ali-支付宝  wx-微信) */
    private String payMethod;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public GoodsOrderVO(GoodsOrder goodsOrder) {
        this.id = goodsOrder.getId();
        this.dishId = goodsOrder.getGoodsId();
        this.status = goodsOrder.getStatu();
        this.name = goodsOrder.getGoodsName();
        this.image = goodsOrder.getGoodsImg();
        this.amount = goodsOrder.getGoodsPrice();
        this.payMethod = goodsOrder.getPayMethod();
        this.address = goodsOrder.getAddress();
        this.userPhone = goodsOrder.getUserPhone();
        this.userName = goodsOrder.getUserName();
        this.createTime = goodsOrder.getCreateTime();
    }

}
